home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
This Disc Bytes!
/
Power Computing - The Disc 2 - This Disc Bytes.ISO
/
mac
/
CodeWarrior 7 Lite for 68K
/
MacOS Support
/
Headers
/
Universal Headers
/
ImageCodec.h
< prev
next >
Wrap
Text File
|
1995-07-06
|
7KB
|
249 lines
/*
File: ImageCodec.h
Contains: QuickTime Interfaces.
Version: Technology: QuickTime 2.0
Package: Universal Interfaces 2.1 in “MPW Latest” on ETO #18
Copyright: © 1984-1995 by Apple Computer, Inc.
All rights reserved.
Bugs?: If you find a problem with this file, use the Apple Bug Reporter
stack. Include the file and version information (from above)
in the problem description and send to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __IMAGECODEC__
#define __IMAGECODEC__
#ifndef __TYPES__
#include <Types.h>
#endif
/* #include <ConditionalMacros.h> */
#ifndef __QUICKDRAW__
#include <Quickdraw.h>
#endif
/* #include <MixedMode.h> */
/* #include <QuickdrawText.h> */
#ifndef __QDOFFSCREEN__
#include <QDOffscreen.h>
#endif
/* #include <Errors.h> */
#ifndef __WINDOWS__
#include <Windows.h>
#endif
/* #include <Memory.h> */
/* #include <Events.h> */
/* #include <OSUtils.h> */
/* #include <Controls.h> */
/* #include <Menus.h> */
#ifndef __IMAGECOMPRESSION__
#include <ImageCompression.h>
#endif
/* #include <Components.h> */
/* #include <StandardFile.h> */
/* #include <Dialogs.h> */
/* #include <TextEdit.h> */
/* #include <Files.h> */
/* #include <Finder.h> */
#ifndef __COMPONENTS__
#include <Components.h>
#endif
#ifndef __MOVIES__
#include <Movies.h>
#endif
/* #include <Aliases.h> */
/* #include <AppleTalk.h> */
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
enum {
codecGetCodecInfo = 0x00,
codecGetCompressionTime = 0x01,
codecGetMaxCompressionSize = 0x02,
codecPreCompress = 0x03,
codecBandCompress = 0x04,
codecPreDecompress = 0x05,
codecBandDecompress = 0x06,
codecCDSequenceBusy = 0x07,
codecGetCompressedImageSize = 0x08,
codecGetSimilarity = 0x09,
codecTrimImage = 0x0A,
codecRequestSettings = 0x0B,
codecGetSettings = 0x0C,
codecSetSettings = 0x0D,
codecCDSequenceFlush = 0x0E,
codecSetTimeCode = 0x0F
};
enum {
codecCanScale = 1L << 0,
codecCanMask = 1L << 1,
codecCanMatte = 1L << 2,
codecCanTransform = 1L << 3,
codecCanTransferMode = 1L << 4,
codecCanCopyPrev = 1L << 5,
codecCanSpool = 1L << 6,
codecCanClipVertical = 1L << 7,
codecCanClipRectangular = 1L << 8,
codecCanRemapColor = 1L << 9,
codecCanFastDither = 1L << 10,
codecCanSrcExtract = 1L << 11,
codecCanCopyPrevComp = 1L << 12,
codecCanAsync = 1L << 13,
codecCanMakeMask = 1L << 14,
codecCanShift = 1L << 15,
codecCanAsyncWhen = 1L << 16,
codecCanShieldCursor = 1L << 17,
codecCanManagePrevBuffer = 1L << 18
};
struct CodecCapabilities {
long flags;
short wantedPixelSize;
short extendWidth;
short extendHeight;
short bandMin;
short bandInc;
short pad;
unsigned long time;
};
typedef struct CodecCapabilities CodecCapabilities;
enum {
codecConditionFirstBand = 1L << 0,
codecConditionLastBand = 1L << 1,
codecConditionFirstFrame = 1L << 2,
codecConditionNewDepth = 1L << 3,
codecConditionNewTransform = 1L << 4,
codecConditionNewSrcRect = 1L << 5,
codecConditionNewMask = 1L << 6,
codecConditionNewMatte = 1L << 7,
codecConditionNewTransferMode = 1L << 8,
codecConditionNewClut = 1L << 9,
codecConditionNewAccuracy = 1L << 10,
codecConditionNewDestination = 1L << 11,
codecConditionFirstScreen = 1L << 12,
codecConditionDoCursor = 1L << 13,
codecConditionCatchUpDiff = 1L << 14,
codecConditionCodecChangedMask = 1L << 31
};
enum {
codecInfoResourceType = 'cdci',
codecInterfaceVersion = 2
};
struct CodecCompressParams {
ImageSequence sequenceID;
ImageDescriptionHandle imageDescription;
Ptr data;
long bufferSize;
long frameNumber;
long startLine;
long stopLine;
long conditionFlags;
CodecFlags callerFlags;
CodecCapabilities *capabilities;
ICMProgressProcRecord progressProcRecord;
ICMCompletionProcRecord completionProcRecord;
ICMFlushProcRecord flushProcRecord;
PixMap srcPixMap;
PixMap prevPixMap;
CodecQ spatialQuality;
CodecQ temporalQuality;
Fixed similarity;
DataRateParamsPtr dataRateParams;
long reserved;
};
typedef struct CodecCompressParams CodecCompressParams;
struct CodecDecompressParams {
ImageSequence sequenceID;
ImageDescriptionHandle imageDescription;
Ptr data;
long bufferSize;
long frameNumber;
long startLine;
long stopLine;
long conditionFlags;
CodecFlags callerFlags;
CodecCapabilities *capabilities;
ICMProgressProcRecord progressProcRecord;
ICMCompletionProcRecord completionProcRecord;
ICMDataProcRecord dataProcRecord;
CGrafPtr port;
PixMap dstPixMap;
BitMapPtr maskBits;
PixMapPtr mattePixMap;
Rect srcRect;
MatrixRecord *matrix;
CodecQ accuracy;
short transferMode;
ICMFrameTimePtr frameTime;
long reserved[1];
SInt8 matrixFlags;
SInt8 matrixType;
Rect dstRect;
};
typedef struct CodecDecompressParams CodecDecompressParams;
enum {
matrixFlagScale2x = 1L << 7
};
extern pascal ComponentResult CDGetCodecInfo(Handle storage, CodecInfo *info);
extern pascal ComponentResult CDGetCompressionTime(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *time);
extern pascal ComponentResult CDGetMaxCompressionSize(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ quality, long *size);
extern pascal ComponentResult CDPreCompress(Handle storage, CodecCompressParams *params);
extern pascal ComponentResult CDBandCompress(Handle storage, CodecCompressParams *params);
extern pascal ComponentResult CDPreDecompress(Handle storage, CodecDecompressParams *params);
extern pascal ComponentResult CDBandDecompress(Handle storage, CodecDecompressParams *params);
extern pascal ComponentResult CDCodecBusy(Handle storage, ImageSequence seq);
extern pascal ComponentResult CDGetCompressedImageSize(Handle storage, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize);
extern pascal ComponentResult CDGetSimilarity(Handle storage, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity);
extern pascal ComponentResult CDTrimImage(Handle storage, ImageDescriptionHandle Desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc);
extern pascal ComponentResult CDRequestSettings(Handle storage, Handle settings, Rect *rp, ModalFilterUPP filterProc);
extern pascal ComponentResult CDGetSettings(Handle storage, Handle settings);
extern pascal ComponentResult CDSetSettings(Handle storage, Handle settings);
extern pascal ComponentResult CDCodecFlush(Handle storage);
extern pascal ComponentResult CDCodecSetTimeCode(Handle storage, void *timeCodeFormat, void *timeCodeTime);
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#ifdef __cplusplus
}
#endif
#endif /* __IMAGECODEC__ */